export function List({
  projectList,
  personList,
}: {
  projectList: { id: string; personId: string; name: string }[];
  personList: { id: string; name: string }[];
}) {
  return (
    <table>
      <thead>
        <tr>
          <th>项目名</th>
          <th>负责人</th>
        </tr>
      </thead>
      <tbody>
        {projectList.map((item, index) => {
          return (
            <tr key={item.id}>
              <td>{item.name}</td>
              <td>
                {personList.find((person) => person.id === item.personId)?.name}
              </td>
            </tr>
          );
        })}
      </tbody>
    </table>
  );
}
